﻿using System;
using System.Runtime.Serialization;

[DataContract]
public class Resa
{

    private int resaID; 
    private string anstalld; 
    private int semesterDagar; 
    private string inrikesUtrikes; 
    private bool sverigeStart; 
    private string anledning; 
    private DateTime startDatum; 
    private DateTime slutDatum;
    private string land;
    private bool godkand;
    private double traktamente;

	public Resa(int resaID, string anstalld, int semesterDagar, string inrikesUtrikes, bool sverigeStart, string anledning, DateTime startDatum, DateTime slutDatum, string land, bool godkand, double traktamente)
	{
        this.resaID = resaID;
        this.anstalld = anstalld;
        this.semesterDagar = semesterDagar;
        this.inrikesUtrikes = inrikesUtrikes;
        this.sverigeStart = sverigeStart;
        this.anledning = anledning;
        this.startDatum = startDatum;
        this.slutDatum = slutDatum;
        this.land = land;
        this.godkand = godkand;
        this.traktamente = traktamente;
	}

    [DataMember]
    public int ResaID {
        get { return resaID; } 
        set { resaID = value; } 
    }

    [DataMember]
    public string Anstalld {
        get { return anstalld; }
        set { anstalld = value; }
    }

    [DataMember]
    public int SemesterDagar { 
        get { return semesterDagar; }
        set { semesterDagar =value; }
    }

    [DataMember]
    public string InrikesUtrikes
    {
        get { return inrikesUtrikes; }
        set {
            if (value.ToLower().Equals("inrikes") || value.ToLower().Equals("utrikes")) 
            {
                inrikesUtrikes = value;
            }         
        }
    }

    [DataMember]
    public bool SverigeStart { 
        get { return sverigeStart; }
        set { sverigeStart = value; }
    }

    [DataMember]
    public string Anledning {
        get { return anledning; }
        set { anledning = value; }
    }

    [DataMember]
    public DateTime StartDatum {
        get { return startDatum; }
        set { startDatum = value; }
    }

    [DataMember]
    public DateTime SlutDatum
    {
        get { return slutDatum; }
        set { slutDatum = value; }
    }

    [DataMember]
    public string Land
    {
        get { return land; }
        set { land = value; }
    }

    [DataMember]
    public bool Godkand
    {
        get { return godkand; }
        set { godkand = value; }
    }

    [DataMember]
    public double Traktamente
    {
        get { return traktamente; }
        set { traktamente = value; }
    }
}
